<!DOCTYPE html>
<html lang="en"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>My Orders</title>
    <script type="text/javascript" src="../js/OrderTab.js"></script>
</head>
<body>
<div th:replace="common/top"></div>
<div id="BackLink">
    <a href="/catalog/view">
        Return to Main Menu
    </a>
</div>
<div id="Center-Content">
    <table class="rwd-table">
        <tr>
            <th>Order ID</th>
            <th>Date</th>
            <th>Total Price</th>
            <th>Status</th>
        </tr>

        <tr th:each="order:${session.orderList}">
            <td>
                <a th:href="@{/order/viewOrderByOrderId(orderId=${order.orderId})}" th:text="${order.orderId}"></a>
            </td>
            <td th:text="${{order.orderDate}}">
<!--                    <fmt:formatDate value="${order.orderDate}" pattern="yyyy/MM/dd hh:mm:ss" />-->
            </td>
            <td th:text="'$' + ${{order.totalPrice}}">
<!--                    <fmt:formatNumber value="${order.totalPrice}" pattern="$#,##0.00" />-->
            </td>
            <td th:text="${{order.status}}">
            </td>
        </tr>

    </table>

</div>

<div th:replace="common/bottom"></div>
</body>
</html>